package priv.pattern.observerpattern.subscriber;
import com.google.common.eventbus.Subscribe;
import lombok.extern.slf4j.Slf4j;
import priv.pattern.observerpattern.event.CustomEvent;

import java.time.Instant;

/*
 * 作者：m鹏h
 * 时间；2024/6/7 22:04
 * 描述：事件监听 1
 **/
@Slf4j
public class Subscriber1 {
 @Subscribe
 public void test1(CustomEvent event){
  log.info("苹果 {} 是不是高品质？{} 监听1  test1 ",event.getName(),event.getQualityGoods());
 }

 @Subscribe
 public void test2(CustomEvent event){
  log.info("苹果 {} 是不是高品质？{} 监听1  test2 ",event.getName(),event.getQualityGoods());
 }
}
